package com.ethink.order.api;

import com.ethink.order.api.request.JkyTradeLogUpdateCkFlagRequest;
import com.ethink.order.api.request.JkyTradeLogUpdateErrorRequest;
import com.ethink.order.api.response.JkyTradeLogGetDetailResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RequestParam;
import com.ethink.order.api.info.JkyTradeLogInfo;
import com.ethink.order.api.request.JkyTradeLogAddRequest;
import com.ethink.order.api.request.JkyTradeLogUpdateRequest;
import com.ethink.order.api.response.JkyTradeLogAddResponse;

/**
 * 吉客云销售单 Facade接口
 *
 * @author default
 * @date 2022-11-25
 */
@FeignClient(name = "ethink-order-service", path = "order-service/facade/v1/jkyTradeLog", contextId = "jkyTradeLogFacade")
public interface JkyTradeLogFacade {

    @PostMapping("/getJkyTradeLogById")
    @ResponseBody
    JkyTradeLogInfo getJkyTradeLogByTradeNo(@RequestParam("tradeNo") String tradeNo);

    @PostMapping("/lastGmtModifiedJkyTradeLog")
    @ResponseBody
    JkyTradeLogInfo lastGmtModifiedJkyTradeLog();

    @PostMapping("/lastConsignTimeJkyTradeLog")
    @ResponseBody
    JkyTradeLogInfo lastConsignTimeJkyTradeLog();

    @PostMapping("/topOneProcessingJkyTradeLog")
    @ResponseBody
    JkyTradeLogGetDetailResponse topOneProcessingJkyTradeLog();

    @PostMapping("/addJkyTradeLog")
    @ResponseBody
    JkyTradeLogAddResponse addJkyTradeLog(@RequestBody JkyTradeLogAddRequest request);

    @PostMapping("/updateJkyTradeLog")
    @ResponseBody
    void updateJkyTradeLog(@RequestBody JkyTradeLogUpdateRequest request);

    @PostMapping("/updateJkyTradeLogCkFlag")
    @ResponseBody
    void updateJkyTradeLogCkFlag(@RequestBody JkyTradeLogUpdateCkFlagRequest request);

    @PostMapping("/updateJkyTradeLogError")
    @ResponseBody
    void updateJkyTradeLogError(@RequestBody JkyTradeLogUpdateErrorRequest request);

}